package beefs.lowlevel;

import static org.junit.Assert.assertFalse;

import java.io.IOException;

import org.designwizard.design.ClassNode;
import org.designwizard.exception.InexistentEntityException;
import org.designwizard.main.DesignWizard;
import org.junit.Test;

import beefs.common.Mappings;

public class OSDTest {

	private DesignWizard dw;

	public OSDTest() {
		try {
			this.dw = new DesignWizard("resources/allclasses");
		} catch (IOException e) {}
	}

	@Test
	public void testObjectStorageDevice() throws InexistentEntityException {
		
		System.out.println("---" + Mappings.DS+".StorageObject" + " violations");


		ClassNode storageObject = dw.getClass(Mappings.DS+".StorageObject");

		System.out.println();
		assertFalse(storageObject.getName() + "is_accessing" + Mappings.DS_OSD_CLASS,storageObject.getCalleeClasses().contains(dw.getClass(Mappings.DS_OSD_CLASS)));

	}

}
